package com.example.huadu_server.appointment.service;

import com.example.huadu_server.appointment.dto.AppointmentAuditDTO;
import com.example.huadu_server.appointment.dto.AppointmentDTO;
import com.example.huadu_server.appointment.dto.ChangeDateDTO;
import com.example.huadu_server.config.Response;

import java.util.Map;

public interface AppointmentService {

    /**
     * 用户预约看房
     */
    Response<String> reserveHouse(AppointmentDTO appointmentDTO);

    /**
     * 获取用户的预约列表（支持分页）
     */
    Response<Map<String, Object>> getAppointmentsByUserId(int userId, int pageNo, int pageSize);

    /**
     * 获取房东的预约列表（支持分页和状态筛选）
     */
    Response<Map<String, Object>> getAppointmentsByLandlordId(int landlordId, String status, int pageNo, int pageSize);

    /**
     * 房东审核预约
     */
    Response<String> auditAppointment(int currentLandlordId, AppointmentAuditDTO appointmentAuditDTO);

    /**
     * 变更预约时间，变更成功后预约状态设置为 pending
     */
    Response<String> changeAppointmentTime(ChangeDateDTO changeDateDTO);

    /**
     * 取消预约
     * @param appointmentId
     * @return
     */
    Response<String> cancelAppointment(Long appointmentId, Integer userId);



}
